1. Field of the Technology
This disclosure pertains generally to digital imaging, and more particularly to Bayer color encoding and decoding of digital images.
2. Background Discussion
Numerous color camera systems (e.g., digital cameras, camcorders, and scanners) utilizing single-chip digital image sensors make use of a Bayer filter mosaic including a color filter array (CFA) for arranging RGB color filters on/over a grid of photosensors. This particular (Bayer) arrangement of color filters, having 50% green, 25% red and 25% blue, is utilized to create a color image, and is alternately referred to as RGBG, GRGB, or RGGB. It should be appreciated that since the human eye is more sensitive to green there are more green pixels because more content in the green portion of the spectrum enhances image appearance.
Bayer color images are typically encoded with only 8-bit resolution, as opposed to the typical 24-bit (RGB) representation. By assigning each pixel either a Red, Blue, or one of two Green values (i.e., Gr, Gb), one can then utilize the color information in the vicinity of each pixel to specify the actual color for that pixel, or assign colors for that pixel group. Bayer encoding utilizes a color mosaic in which the colors alternate so that the colors in a neighborhood can be used to determine the value for each color component of the pixel in question.
FIG. 1 depicts a Bayer color mosaic, showing a total of 8 pixel groups, R1, B1, Gr1, Gb1, through to R8, B8, Gr8, Gb8. It can be seen that every position has a particular color component and is surrounded by at least two of each of the other color values. It will be noted that a Bayer image has four color planes (1) R-plane, (2) Gr-plane, (3) Gb-plane, and (4) B-plane. References to image “planes” in Bayer encoding refer to a “color-plane”.
Typically, residuals are generated for these pixels based on a difference between the pixel and an average of neighboring pixels of the same color. Generally, the averaging process in Bayer encoding exploits spatial correlation within the same color, and is referred to as intra-plane correlation. This averaging takes into account that closely neighboring samples with the same color tend to have more similar values compared to distant samples. For example, it is more likely that |R1−R2|<|R1−R4|.
However, it would be beneficial to enhance prediction during Bayer color encoding to increase encoding efficiency.
Accordingly, the present technology extends Bayer encoding benefits and overcomes shortcomings of previous approaches.